<template>
  <el-dialog title="详情" :visible.sync="visible" :close-on-click-modal="false" width="70%" top="10vh">
    <div class="sketch_content">
      <el-form :model="form" label-width="120px" ref="dataForm">
        <el-row>
          <el-col :xs="24" :sm="12" :md="8">
            <el-form-item label="编号:">
              <span>{{form.code}}</span>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <el-form-item label="名称:">
              <span>{{form.name}}</span>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <el-form-item label="联系人:">
              <span>{{form.linkMan}}</span>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <el-form-item label="手机号码:">
              <span>{{form.phone}}</span>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <el-form-item label="邮箱:">
              <span>{{form.email}}</span>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <el-form-item label="状态:">
              <span v-if="form.status === 1">停用</span>
              <span v-if="form.status === 2">正常</span>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <el-form-item label="有效开始时间:">
              <span>{{form.startTime}}</span>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <el-form-item label="有效截止时间:">
              <span>{{form.endTime}}</span>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <el-form-item label="备注:">
              <span>{{form.remark}}</span>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <el-form-item label="创建时间:">
              <span>{{form.createTime}}</span>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button size="small" icon="el-icon-close" @click.native="visible = false">关闭</el-button>
    </span>
  </el-dialog>

</template>

<script>
  export default {
    data () {
      return {
        visible: false,
        form: {}
      }
    },
    methods: {
      init (id) {
        this.form = {}
        this.visible = true
        if (id) {
          this.httpGet(`/sysTenant/info/${id}`).then(res => {
            this.form = res.data
          })
        }
      }
    }
  }
</script>

